using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Practices.RecipeFramework;
using EnvDTE;

namespace Microsoft.Practices.RepositoryFactory.Actions.VisualStudio
{
    public class SetCustomToolAction : ConfigurableAction
    {
        #region Input Properties
        private ProjectItem projectItem;

        /// <summary>
        /// Gets or sets the project item.
        /// </summary>
        /// <value>The project item.</value>
        [Input(Required = true)]
        public ProjectItem ProjectItem
        {
            get { return projectItem; }
            set { projectItem = value; }
        }

        private string customTool;

        [Input(Required = true)]
        public string CustomTool
        {
            get { return customTool; }
            set { customTool = value; }
        }
        #endregion

        #region ConfigurableAction Implementation

        public override void Execute()
        {
            this.projectItem.Properties.Item("CustomTool").Value = this.customTool;
        }

        public override void Undo()
        {
            //Not Implemented
        }

        #endregion

    }
}
